// import uView from '@/node_modules/uview-ui'
// Vue.use(uView)
// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import store from './store/index.js'
import uView from '@/node_modules/uview-ui'
Vue.use(uView)
// 请求拦截器
uni.addInterceptor('request', {
	
	invoke: (config) => {
		// console.log(config);
		uni.showLoading({
			title: '加载中'
		});
		const token = uni.getStorageSync('token')
		config.header = {...config.header, token}
	},
	complete: () => {
		uni.hideLoading()
	}
})

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	...App,
	// 将store挂载到vue实例上
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import App from './App.vue'
import loginVue from './subpkg/login/login.vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif
